package java8_13;

/**
 * @author oldliu
 * @since 1.0
 */
public class java8_12_ArrayFill {
    public static void main(String[] args) {
        int[] arr = {93, 14, 39, 4, 6, 9};
        boolean repeat = false;
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = i + 1; j < arr.length ; j++) {
                if (arr[i] == arr[j]) {
                    repeat = true;
                    break;
                }
            }
        }
        if (repeat) {
            System.out.println("有重复");
        } else {
            System.out.println("没有重复");
        }

        //Scanner input = new Scanner(System.in);
//        int[] a = {5555, 9, 7, 22, 45, 67, 99, 8, 9, 78};
//        int max = a[0];
//        int position = 1;
//        int b;
//        for (b = 0; b < a.length; b++) {
//            if (max < a[b]) {
//                max = a[b];
//                position = b + 1;
//            }
//        }
//        System.out.print("最大的数字为：" + max + "\t" + "位置为：" + position);

//        int[]arr=new int[10];
//        for (int i=1;i<=arr.length;i++){
//            arr[i-1]=i*i;
//        }
//        for (int i=arr.length-1;i>=0;i--){
//            System.out.println(arr[i]);
//        }
    }
}
